package com.ja.openchat.ui.found;

import com.chad.library.adapter.base.BaseMultiItemQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.ja.openchat.R;
import com.ja.openchat.data.entity.UserInfoMultiEntity;
import com.ja.openchat.views.UserAvatarView;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

public class CircleUserGridAdapter extends BaseMultiItemQuickAdapter<UserInfoMultiEntity, BaseViewHolder> {
    public CircleUserGridAdapter(@Nullable List<UserInfoMultiEntity> data) {
        super(data);
        addItemType(0, R.layout.item_multi_my_image_publish_at);
        addItemType(1, R.layout.item_multi_my_image_add_at);
        addChildClickViewIds(R.id.iv_add);
    }
    //    public CircleUserAdapter(@Nullable List<UserInfoMultiEntity> data) {
//        super(R.layout.item_post_circle_user_avatar, data);
//    }

    @Override
    protected void convert(@NotNull BaseViewHolder helper, UserInfoMultiEntity userInfo) {
        switch (helper.getItemViewType()) {
            case 0:
                UserAvatarView userAvatarView = helper.getView(R.id.header_image_view);
                userAvatarView.showUser(userInfo.userInfo);
                break;
            case 1:
                break;
        }
    }
}
